package com.onesports.intelligent.k12.polarlight.domain.dto.operation;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 运营团队
 *
 * @author wangcx
 * @since 1.0.0 2022-07-11
 */
@Data
@ApiModel(value = "运营端插入运营团队DTO")
public class InsertOrganizationDTO {

    @NotBlank(message = "团队名称不能为空")
    @ApiModelProperty(value = "团队名称",required = true)
    private String organizationName;

    @NotBlank(message = "负责人不能为空")
    @ApiModelProperty(value = "负责人",required = true)
    @Length(message = "负责人长度不能大于20",max = 20)
    private String principal;

    @NotBlank(message = "手机号不能为空")
    @ApiModelProperty(value = "手机号",required = true)
    @Length(message = "手机号不能大于11位",max = 11)
    private String phoneNumber;

    @NotNull(message = "入驻期限不能为空")
    @ApiModelProperty(value = "入驻期限",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date occupancyPeriod;

    @NotBlank(message = "省份不能为空")
    @ApiModelProperty(value = "省",required = true)
    private String province;

    @NotBlank(message = "城市不能为空")
    @ApiModelProperty(value = "市",required = true)
    private String city;

    @NotBlank(message = "区域不能为空")
    @ApiModelProperty(value = "区",required = true)
    private String area;

    @Length(message = "地址长度不能大于100",max = 100)
    @ApiModelProperty(value = "地址")
    private String address;

    @Length(message = "商户名称不能大于50",max = 50)
    @ApiModelProperty(value = "商户名称")
    private String merchantName;

    @Length(message = "商户号不能大于20",max = 20)
    @ApiModelProperty(value = "商户号")
    private String merchantNo;


    @ApiModelProperty(value = "状态 是否启用 true：启用  false：停用")
    private Boolean status;

    @NotNull(message = "分账比例不能为空")
    @ApiModelProperty(value = "分账比例",required = true)
    @Min(value = 0,message = "分账比例不能小于0,大于100")
    @Max(value = 100,message = "分账比例不能小于0,大于100")
    private BigDecimal subRatio;


}
